Skip to content

Time Recorder Template

1 Purpose

This template example is used to construct a template for displaying time recorder values. It is not mandatory to set up these fields for the time recorder to work, however it is useful to be able to see the fields that the time recorder creates. The documentId of this template (when built) is entered into the sc-time-recorder 'timesheetTemplateId' field on the component. The fields on the document have all been set to read only in the example.

2 Template Example

 "formColor": "#1B132D",
    "appTags": [
        "formbird",
        "support",
        "timeRecorder"
    ],
    "summaryDescriptionRule": "Start: {{{startDate}}} Complete: {{{endDate}}}",
    "summaryNameRule": "Time Recorder - {{{parentIdRel.0.name}}} | {{{accountRel.0.name}}}",
    "components": [
        {
            "name": "appTags",
            "value": [
                "formbird",
                "support",
                "timeRecorder"
            ],
            "componentName": "sc-static-value",
            "visible": false
        },
        {
            "name": "panelStyle",
            "fullWidth": true,
            "componentName": "sc-static-html",
            "html": "<style>.panel-A {background: #ffffff;border:0px} .panel-A > .panel-heading {font-weight:normal;font-size:1.25em;height:35px;line-height:16px; color:white; background: #000000}</style>"
        },
        {
            "label": "Time Recorder Document",
            "componentName": "sc-static-html",
            "fullWidth": true,
            "name": "panelTimeRecorder",
            "wrapAction": "open",
            "wrapHtmlType": "wrap",
            "wrapClass": "panel-A"
        },
        {
            "componentName": "sc-related-document",
            "detail": "",
            "fullWidth": false,
            "label": "Account",
            "enabled": false,
            "name": "accountRel",
            "urlOpenIn": "currentWindow"
        },
        {
            "label": "Action",
            "componentName": "sc-related-document",
            "name": "parentIdRel",
            "enabled": false,
            "fullWidth": false,
            "urlOpenIn": "currentWindow"
        },
        {
            "componentName": "sc-static-html",
            "detail": "",
            "fullWidth": true,
            "html": " "
        },
        {
            "componentName": "sc-date-time",
            "mandatory": false,
            "name": "startDate",
            "label": "Started",
            "enabled": false
        },
        {
            "componentName": "sc-date-time",
            "mandatory": false,
            "name": "endDate",
            "label": "Completed",
            "enabled": false
        },
        {
            "componentName": "sc-static-html",
            "name": "panelTimeRecorder",
            "wrapAction": "close",
            "wrapHtmlType": "wrap"
        }
    ]




The following sc-time-recorder component would be used on a second template:

{
    "componentName": "sc-time-recorder",
    "label": "sc-time-recorder Test",
    "name": "scTimeRecorderTest",
    "parentDocField": "parentIdRel",
    "accountDocField": "accountRel",
    "startDateField": "startDate",
    "endDateField": "endDate",
    "autoClosePrior":true,
    "timesheetTemplateId": "da802a90-e67a-11e6-a653-a97426fd3754"   // Change to documentId of above document when created
}

3 Customization

The example provided may require the following fields to be changed (the list is not exhaustive, just a reminder to check some items)
1. Styling definition
2. name fields of the components - parentIdRel, accountRel, startDate and endDate must match the fields in the time recorder component
3. label fields of the components
4. appTags array
5. formColor